import type {Rule} from 'ant-design-vue/es/form';

export type IMadokaAntSelectMode = "multiple" | "tags" | "SECRET_COMBOBOX_MODE_DO_NOT_USE" | undefined
type InputType =
  | 'button'
  | 'checkbox'
  | 'color'
  | 'date'
  | 'datetime-local'
  | 'email'
  | 'file'
  | 'hidden'
  | 'image'
  | 'month'
  | 'number'
  | 'password'
  | 'radio'
  | 'range'
  | 'reset'
  | 'search'
  | 'submit'
  | 'tel'
  | 'text'
  | 'time'
  | 'url'
  | 'week';
export type IInput = {
    type: InputType
}
export type IButton = {
    title: string
}
export type IAntFormOptions = {
    dataIndex?: string
    title?: string
    required: boolean
    placeholder: string
    rules: Rule[]
    type: "select"
    button: IButton
    select?: IMadokaAntSelect
    input: IInput
};
export type IMadokaAntForm = {
    model?: any
    options?: IAntFormOptions[]
    wrapperCol?: any
    layout?: string
    rules?: Record<string, Rule[]>
}

export type IMadokaAntSelectOption = {
    value: any;
    label: any;
    disabled?: boolean;
    key?: string | number;
    title?: string;
}
export type IMadokaAntSelect = {
    mode?: IMadokaAntSelectMode
    options?: IMadokaAntSelectOption[]
}
